import config from '../../config/app'
import { emit } from '../services/socketio'

export const get_list_all = () => {
    emit({ type: 'get_list_all', data: ['renyuan_files', { _id: -1 }] })
}

export const filter_file = (state, type, value) => {
    return state.filter(m => m[type] === value)[0]
}

export const get_file = (_id)=>{
    emit({ type: 'get_file', data: [config.list_db,{_id:_id}] })
}